//
//  BookcaseView.h
//  ebook
//
//  Created by 吴超飞 on 16/3/4.
//  Copyright © 2016年 Moton. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "BookcaseCellView.h"

@class BookcaseView;
@protocol BookcaseViewDelegate <NSObject>

-(void)bookcaseView:(BookcaseView *)view deleteBook:(Book *)book complete:(void(^)(BOOL suc))complete;
-(void)bookcaseView:(BookcaseView *)view clickBookItem:(Book *)book;
-(void)bookcaseViewClickAddBook:(BookcaseView *)view;
-(void)bookcaseView:(BookcaseView *)view isEditing:(BOOL)isEdit;

@end


@interface BookcaseView : UIScrollView<BookcaseCellViewDelegate,UIGestureRecognizerDelegate>

-(instancetype)initWithBookArray:(NSMutableArray *)array frame:(CGRect)frame;

- (void)updateBookcaseReadpercent:(Book *)book;
- (void)updateBookcaseDownstatus:(NSDictionary *)dic;
//- (void)updateBookcaseNetworkState:(BOOL)isNetConnected;//网络是否连接，更新界面

@property (nonatomic,weak) id<BookcaseViewDelegate> bookDelegate;

@property (nonatomic,retain) NSMutableArray *books;
@property (nonatomic,assign) BOOL isEdit;

@end
